import request from '@/utils/request'

// 获取内容列表
export function GetContentNoticeList(data) {
  return request({
    headers: {
      'Content-Type': 'application/json',
      withoutToken: true
    },
    url: '/api/contentnotice/info',
    method: 'post',
    data: data
  });
}

// 根据id获取内容详情
export function GetContentNoticeBYyId(params) {
  return request({
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      withoutToken: true
    },
    url: '/api/contentnotice/get',
    method: 'get',
    params: params
  });
}

// 根据当前id获取上下条数据
/**
 * @param {string} id
 */
export function getContentUpDown(id) {
  const obj = {
    id
  }
  return request({
    headers: {
      'Content-Type': 'application/json',
      withoutToken: true
    },
    url: '/api/contentnotice/selectUpDown',
    method: 'post',
    data: obj
  })
}

// 获取类型
export function GetContentTypeList(params) {
  return request({
    url: '/api/contenttype/page',
    method: 'get',
    params
  })
}
